package com.gs.librarian.profile.dao.impl;

import org.springframework.stereotype.Repository;

import com.gs.librarian.dao.impl.LibrarianDaoImpl;
import com.gs.librarian.model.entity.User;
import com.gs.librarian.profile.dao.UserDao;

@Repository
public class UserDaoImpl extends LibrarianDaoImpl<User, Long> implements UserDao{

	@Override
	public User getUserByUserName(String userName) {
		return getEntityManager().find(User.class, userName);
	}

	@Override
	public User saveUser(User user) {
		persist(user);
		return user;
	}
}
